<?php


function smarty_modifier_filesize_format( $bits )
{
	$mb = 1048576;
	if ( $mb < $bits )
	{
		$bitStr = number_format( round( $bits / $mb, 2 ), 2 )."M";
		return $bitStr;
	}
	$bitStr = number_format( round( $bits / 1024, 2 ), 2 )."K";
	return $bitStr;
}

?>
